pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let mut result = String::new();
    let mut num = decimal;
    while num > 0 {
        let remainder = num % base;
        let digit = match remainder {
            0..=9 => (b'0' + remainder as u8) as char,
            10..=15 => (b'A' + (remainder - 10) as u8) as char,
            _ => unreachable!(),
        };
        result.push(digit);
        num /= base;
    }
    // 反转结果字符串
    result.chars().rev().collect()
}
